package com.wisezone.workflow.bean;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.wisezone.common.bean.entity.BaseEntity;

/**
 * 流程实例对象
 * 
 * @author tss 2009-09-05
 * 
 */
@Entity
@Table(name = "wf_process_instance")
public class WfProcessInstance extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7983271831489649706L;

	/**
	 * ID
	 */
	private Long id;

	/**
	 * 流程模版ID
	 */
	@Column(name = "process_def_id", length = 8)
	private Long processDefId;

	/**
	 *创建时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
	private Date createTime;

	/**
	 * 开始时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "start_time")
	private Date startTime;

	/**
	 * 结束时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "end_time")
	private Date endTime;

	/**
	 * 状态（1：已发送，2：结束，3：暂停）
	 */
	@Column(name = "state", length = 8)
	private Long state;

	/**
	 * 发起人
	 */
	@Column(name = "starter", length = 8)
	private Long starter;

	/**
	 * 流程实例名称
	 */
	@Column(name = "name", length = 50)
	private String name;

	/**
	 * 备注
	 */
	@Column(name = "memo", length = 100)
	private String memo;

	public Long getProcessDefId() {
		return processDefId;
	}

	public void setProcessDefId(Long processDefId) {
		this.processDefId = processDefId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public Long getState() {
		return state;
	}

	public void setState(Long state) {
		this.state = state;
	}

	public Long getStarter() {
		return starter;
	}

	public void setStarter(Long starter) {
		this.starter = starter;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	@Override
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

}